<template>
  <div class="app-container">
    <TopManu @printBtn="printBtn" @updata='updata'></TopManu>
    <div class="" id="printcons" style="width: 7.5368in; margin: auto">
      <h2 style="text-align: center; line-height: 100px">
        医疗保障基金结算清单
      </h2>

      <table border="0" cellspacing="0" cellpadding="0" class="Table4">
        <colgroup>
          <col width="837" />
        </colgroup>
        <tr class="Table41">
          <td style="text-align: left; width: 7.5368in" class="Table4_A1">
            <p class="P23" style="text-align: right !important">
                清单流水号:
              <span class="T19"> 
                {{ data.setlinfo.setl_list_sn }} 

              </span>
            </p>

            <div class="t_one">
              <div>
                <span class="T19"> 定点医疗机构名称:</span>
                <span class="T19">{{ fixmedins_name }}</span>
              </div>

              <div>
                <span class="T19">定点医疗机构代码:</span>
                <span class="T19">
                  {{ fixmedins_code }}
                </span>
              </div>
              <div>
                <span class="T19"> 医保结算等级:</span>
                <span class="T19">
                  {{ data.setlinfo.hi_setl_lv }}
                </span>
              </div>
            </div>
            <div class="t_one">
              <div>
                <span class="T25">医保编号:</span>
                <span class="T19">
                  {{ data.setlinfo.psn_no }}
                </span>
              </div>
              <div>
                <span class="T19">病案号</span>
                <span class="T19">
                  {{ data.setlinfo.medcasno }}
                </span>
              </div>
              <div>
                <span class="T19">申报时间</span>
                <span class="T19">
                  {{ data.setlinfo.dcla_time }}
                </span>
              </div>
            </div>

            <table border="0" cellspacing="0" cellpadding="0" class="Table1">
              <tr class="Table11">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1"
                >
                  <p class="P24">一、基本信息</p>
                  <div class="box1">
                    <div>
                      <div>
                        <span class="T11">姓名:</span>
                        <span class="T12">
                          {{ data.setlinfo.psn_name }}
                        </span>
                      </div>
                      <div>
                        <span class="T11"> 性别:</span>
                        <span class="T12" style="font-weight: bold;
                        border: 1px solid #cccccc;
                        padding: 3px 5px;
                        margin: 0 30px 0 10px;">{{
                          data.setlinfo.gend == 1
                            ? "1"
                            : data.setlinfo.gend == 2
                            ? "2"
                            : ""
                        }}</span>
                         <span class="T15"> (1.男 2.女)</span>
                      </div>
                      <div>
                        <span class="T11">出生日期:</span>
                        <span class="T12">
                          {{ data.setlinfo.brdy }}
                        </span>
                      </div>
                      <div>
                        <span class="T24">年龄:</span>
                        <span class="T22">{{
                          data.setlinfo.age >= 1
                            ? data.setlinfo.age
                            : data.setlinfo.nwb_age
                        }}</span>
                      </div>
                      <div>
                        <span class="T24">国籍:</span>
                        <span class="T22">{{ data.setlinfo.ntly=='CHN'?'中国':data.setlinfo.ntly }}</span>
                      </div>
                    </div>
                  
                    <div class="">
                        <div>
                        <span class="T24">（年龄不足1周岁）年</span>
                        <span class="T22">___天</span>
                      </div>
                    
                      <div>
                        <span class="T24">民族:</span
                        ><span class="T22" v-if="data.setlinfo.naty">{{$baseBai['naty'][parseInt(data.setlinfo.naty)] }}</span>
                      </div>
                      <div>
                        <span class="T25">患者证件类别:</span
                        ><span class="T22"
                          >{{ data.setlinfo.patn_cert_type }}
                        </span>
                      </div>
                      <div>
                        <span class="T25">患者证件号码:</span
                        ><span class="T22">{{ data.setlinfo.certno }} </span>
                      </div>
                    </div>

                    <div style="justify-content: flex-start">
                      <div style="width: 30%">
                        <span class="T25">职业：</span
                        ><span class="T22"> 
                              <el-select
                      v-model="menform.prfs"
                      placeholder="职业"
                      style="width:120px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.prfslist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                         </span>
                      </div>
                      <div>
                        <span class="T24">现住址：</span
                        ><span class="T21">
                             <el-input class="input-new-tag"
                          v-model="menform.curr_addr"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                         </span>
                      </div>
                    </div>

                    <div>
                      <div>
                        <span class="T25">工作单位名称</span
                        ><span class="T22"> 
                             <el-input class="input-new-tag"
                          v-model="menform.emp_name"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                         </span>
                      </div>
                      <div>
                        <span class="T25">工作单位地址：</span
                        ><span class="T22"
                          >   
                            <el-input class="input-new-tag"
                          v-model="menform.emp_addr"
                            ref="saveTagInput"
                            style="width:200px"
                            size="small"
                          >
                            </el-input>
                                </span
                        >
                      </div>
                      <div>
                        <span class="T25">单位电话：</span
                        ><span class="T22"
                          >
                            <el-input class="input-new-tag"
                          v-model="menform.emp_tel"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>    
                                </span
                        >
                      </div>

                      <!-- <div>
                        <span class="T24">邮编：</span
                        ><span class="T22"
                          >     {{ data.setlinfo.poscode }}        </span
                        >
                      </div> -->
                    </div>

                    <div>
                      <div>
                        <span class="T25">联系人姓名：</span
                        ><span class="T22"
                          >
                            <el-input class="input-new-tag"
                          v-model="menform.coner_name"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>    
                        
                        </span>
                      </div>
                      <div>
                        <span class="T25">关系：</span>
                        <span class="T22">
                             <el-select
                      v-model="menform.patn_rlts"
                      placeholder="关系"
                      style="width:120px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.patn_rltslist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                              </span
                        >
                      </div>
                      <div>
                        <span class="T25">地址：</span
                        ><span class="T22">
                          <el-input class="input-new-tag"
                          v-model="menform.coner_addr"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                             
                        </span>
                      </div>
                      <div>
                        <span class="T24">电话：</span
                        ><span class="T22">
                          <el-input class="input-new-tag"
                          v-model="menform.coner_tel"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input> 
                           
                        </span>
                      </div>
                    </div>

                    <div style="justify-content: flex-start">
                      <div style="width: 40%">
                        <span class="T19">医保类型：</span
                        >
                        <span class="T22">
                             <el-select
                      v-model="menform.hi_type"
                      placeholder="医保类型"
                      style="width:150px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.hi_typelist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                        </span>
                        <!-- <span class="T22">{{ data.setlinfo.hi_type }} </span> -->
                      </div>

                      <div style="width: 50%">
                        <span class="T24"> 特殊人员类型：</span
                        ><span class="T22">
                                <el-select
                      v-model="menform.sp_psn_type"
                      placeholder=" 特殊人员类型："
                      style="width:200px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.sp_psn_typelist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                        </span>
                      </div>
                      <div>
                        <span class="T25">参保地：</span
                        ><span class="T22">{{ data.setlinfo.insu_admdvs }}</span>
                      </div>
                    </div>

            
                  </div>
                </td>
              </tr>
              <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A2"
                >
                  <p class="P12">二、门诊慢特病诊疗信息</p>
                </td>
              </tr>
              <tr class="Table13">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P8">
                    <span class="T19">诊断科别</span
                    ><span
                      class="T20"
                      style="display: inline-block; width: 400px"
                      >{{ data.setlinfo.opsp_diag_caty }}
                    </span>
                    <span class="T19"> 就诊日期</span
                    ><span class="T20"
                      >1{{ data.setlinfo.opsp_diag_caty }}
                    </span>
                  </p>
                </td>
              </tr>
              <tr class="Table12">
                <td
                  colspan="2"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1"
                >
                  <p class="P14">诊断名称</p>
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 0.4847in"
                  class="Table1_A1"
                >
                  <p class="P14">诊断代码</p>
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 0.391in"
                  class="Table1_A1"
                >
                  <p class="P14">手术及操作名称</p>
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 0.1681in"
                  class="Table1_A1"
                >
                  <p class="P14">手术及操作代码</p>
                </td>
              </tr>
              <tr
                class="Table12"
                v-for="(item, index) in data.opspdiseinfo"
                :key="index"
                style="line-height: 35px"
              >
                <td
                  colspan="2"
                  style="text-align: center; width: 1.5597in; font-size: 14px"
                  class="Table1_A1"
                >
                  {{ item.diag_name }}
                </td>
                <td
                  colspan="5"
                  style="text-align: center; width: 0.4847in; font-size: 14px"
                  class="Table1_A1"
                >
                  {{ item.diag_code }}
                </td>
                <td
                  colspan="5"
                  style="text-align: center; width: 0.391in; font-size: 14px"
                  class="Table1_A1"
                >
                  {{ item.oprn_oprt_name }}
                </td>
                <td
                  colspan="5"
                  style="text-align: center; width: 0.1681in; font-size: 14px"
                  class="Table1_A1"
                >
                  {{ item.oprn_oprt_code }}
                </td>
              </tr>

              <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A11"
                >
                  <p class="P12">三、住院诊疗信息</p>
                </td>
              </tr>
              <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A12 paddingLeft"
                >
                  <p class="P18">
                    <span class="T19">住院医疗类型:</span
                    ><span
                      class="T22"
                      
                    >
                      
                      <el-select
                      v-model="menform.ipt_med_type"
                      placeholder="住院医疗类型"
                      style="width:120px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.ipt_med_typelist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                      </span
                    >
                    <!-- <span class="T10"> 1.住院   2.日间手术</span> -->
                  </p>
                </td>
              </tr>
              <!-- <tr class="Table113">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P18">
                    <span class="T15">入院途径</span>
                    <span
                      style="
                        font-weight: bold;
                        border: 1px solid #cccccc;
                        padding: 3px 5px;
                        margin: 0 30px 0 10px;
                      "
                      >{{ data.setlinfo.adm_way_code }}</span
                    >

                    <span class="T15">
                      1.急诊   2.门诊   3.其他医疗机构转入   9.其他</span
                    >
                  </p>
                </td>
              </tr> -->
              <!-- <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P18">
                    <span class="T15">治疗类别</span>
                    <span
                      style="
                        font-weight: bold;
                        border: 1px solid #cccccc;
                        padding: 3px 5px;
                        margin: 0 30px 0 10px;
                      "
                      >{{ data.setlinfo.trt_type }}</span
                    >

                    <span class="T15">
                      1.西医   2.中医（2.1 中医   2.2民族医）   3.中西医</span
                    >
                  </p>
                </td>
              </tr> -->
              <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <div class="P7 centWrap"  style="padding: 15px;">
                    <div>
                      <span class="T19">入院时间:</span>
                      <span class="T20"> {{ data.setlinfo.adm_time }} </span>
                    </div>
                    <div>
                      <span class="T19"> 入院科别:</span
                      ><span class="T20" v-if="data.setlinfo.adm_caty"
                        >{{ $baseBai["adm_caty"][data.setlinfo.adm_caty] }}
                      </span>
                    </div>

                    <div>
                      <span class="T19">  转科科别:</span
                      ><span class="T20">
                        {{ data.setlinfo.refl_caty }}
                      </span>
                    </div>
                  </div>
                </td>
              </tr>
              <tr class="Table12">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <div class="P18 centWrap" style="padding: 15px;">
                    <div>
                      <!-- <span class="T15">出院时间：       </span> -->
                  <span class="T15"><el-date-picker
                      v-model="menform.dscg_time"
                      type="date"
                      placeholder="出院时间"
                      format="yyyy 年 MM 月 dd 日"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker></span>
                    </div>
                     <div>
                      <span class="T19">出院科别</span>
                      <span class="T20">{{ data.setlinfo.dscg_caty }} </span>
                    </div>
                    <div style="padding-right: 15px">
                      <span class="T19">实际住院</span
                      ><span class="T20"
                        >{{ data.setlinfo.act_ipt_days }}天</span
                      >
                    </div>
                  </div>
                </td>
              </tr>
              <!-- <tr class="Table117">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P7">
                    <span class="T19">门（急）诊诊断（西医诊断）</span
                    ><span class="T20"> {{ data.setlinfo.otp_wm_diag }}  </span>
                    <span class="T19">    疾病代码</span
                    ><span class="T20">
                      {{ data.setlinfo.otp_wm_diag_dise_code }}  </span
                    >
                  </p>
                  <p class="P7">
                    <span class="T19">门（急）诊诊断（中医诊断）</span
                    ><span class="T20">
                        {{ data.setlinfo.otp_tcm_diag }}
                    </span>
                    <span class="T19">  疾病代码</span
                    ><span class="T20">
                      {{ data.setlinfo.otp_tcm_diag_dise_code }}  </span
                    >
                  </p>
                </td>
              </tr>
              <tr class="Table118">
                <td
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P4">出院西医诊断</p>
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.3875in"
                  class="Table1_A1"
                >
                  <p class="P4">疾病代码</p>
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.2326in"
                  class="Table1_A1"
                >
                  <p class="P4">入院病情</p>
                </td>
                <td
                  colspan="4"
                  style="text-align: left; width: 0.391in"
                  class="Table1_A1"
                >
                  <p class="P4"><span class="T26">出院中医诊断</span></p>
                </td>
                <td
                  colspan="4"
                  style="text-align: left; width: 0.3882in"
                  class="Table1_A1"
                >
                  <p class="P4">疾病代码</p>
                </td>
                <td
                  colspan="2"
                  style="text-align: left; width: 0.2736in"
                  class="Table1_A1"
                >
                  <p class="P4">入院病情</p>
                </td>
              </tr>
              <tr
                class="Table118 paddingLeft"
                v-for="(item, index1) in data.diseinfo"
                :key="'index1' + index1"
              >
                <td
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p
                    class="P5"
                    v-if="
                      index1 === 0 &&
                      (item.DIAG_TYPE == 1 || item.DIAG_TYPE == 2)
                    "
                  >
                    主要诊断：{{ item.diag_name }}
                  </p>
                  <p
                    class="P5"
                    v-if="
                      index1 !== 0 &&
                      (item.DIAG_TYPE == 1 || item.DIAG_TYPE == 2)
                    "
                  >
                    其他诊断：{{ item.diag_name }}
                  </p>
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.3875in"
                  class="Table1_A1"
                >
                  <span v-if="item.DIAG_TYPE == 1 || item.DIAG_TYPE == 2">{{
                    item.diag_code
                  }}</span>
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.2326in"
                  class="Table1_A1"
                >
                  <span v-if="item.DIAG_TYPE == 1 || item.DIAG_TYPE == 2">{{
                    item.DIAG_TYPE
                  }}</span>
                </td>
                <td
                  colspan="4"
                  style="text-align: left; width: 0.391in"
                  class="Table1_A1"
                >
                  <p
                    class="P5"
                    v-if="
                      index1 === 0 &&
                      (item.DIAG_TYPE == 3 || item.DIAG_TYPE == 4)
                    "
                  >
                    主病：{{ item.diag_name }}
                  </p>
                  <p
                    class="P5"
                    v-if="
                      index1 !== 0 &&
                      (item.DIAG_TYPE == 3 || item.DIAG_TYPE == 4)
                    "
                  >
                    主证:{{ item.diag_name }}
                  </p>
                </td>
                <td
                  colspan="4"
                  style="text-align: left; width: 0.3882in"
                  class="Table1_A1"
                >
                  <span v-if="item.DIAG_TYPE == 3 || item.DIAG_TYPE == 4">{{
                    item.diag_code
                  }}</span>
                </td>

                <td
                  colspan="2"
                  style="text-align: left; width: 0.2736in"
                  class="Table1_A1"
                >
                  <span v-if="item.DIAG_TYPE == 3 || item.DIAG_TYPE == 4">{{
                    item.adm_cond_type
                  }}</span>
                </td>
              </tr>

              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P5">
                    诊断代码计数:<span class="T20" style="width: 200px">{{
                      data.setlinfo.diag_code_cnt
                    }}</span>
                  </p>
                </td>
              </tr>
              <tr class="Table118">
                <td style="text-align: left" class="Table1_A1 paddingLeft">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">手术及操作名称</span>
                  </p>
                </td>
                <td colspan="4" style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">手术及操作代码</span>
                  </p>
                </td>
                <td style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">手术及操作日期</p>
                </td>
                <td colspan="3" style="text-align: left" class="Table1_A1">
                  <p class="P4">麻醉方式</p>
                </td>
                <td style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">术者医师姓名</span>
                  </p>
                </td>
                <td colspan="3" style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">术者医师代码</span>
                  </p>
                </td>
                <td colspan="3" style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">麻醉医师姓名</span>
                  </p>
                </td>
                <td style="text-align: left" class="Table1_A1">
                  <p class="P4" style="line-height: 20px">
                    <span class="T31">麻醉医师代码</span>
                  </p>
                </td>
              </tr>
              <tr
                class="Table118 paddingLeft"
                v-for="(item, index2) in data.oprninfo"
                :key="'index2' + index2"
              >
                <td style="text-align: left; width: 1.5597in" class="Table1_A1">
                  <p class="P20" v-if="index2 === 0">
                    主要：{{ item.oprn_oprt_name }}
                  </p>
                  <p class="P20" v-if="index2 !== 0">
                    其他：{{ item.oprn_oprt_name }}
                  </p>
                </td>
                <td
                  colspan="4"
                  style="text-align: left; width: 0.3875in"
                  class="Table1_A1"
                >
                  {{ item.oprn_oprt_code }}
                </td>
                <td style="text-align: left; width: 0.7868in" class="Table1_A1">
                  {{ item.oprn_oprt_date }}
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.1472in"
                  class="Table1_A1"
                >
                  {{ item.anst_way }}
                </td>
                <td style="text-align: left; width: 0.7882in" class="Table1_A1">
                  {{ item.oper_dr_name }}
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.2313in"
                  class="Table1_A1"
                >
                  {{ item.oper_dr_code }}
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.1257in"
                  class="Table1_A1"
                >
                  {{ item.anst_dr_name }}
                </td>
                <td style="text-align: left; width: 0.7569in" class="Table1_A1">
                  {{ item.anst_dr_code }}
                </td>
              </tr>

              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <div class="" style="display: flex; padding: 10px">
                    <div style="width: 40%">
                      手术及操作起止时间:

                      <span class="T20">{{
                        data.setlinfo.oprn_oprt_code_cnt
                      }}</span>
                    </div>
                    <div>
                      麻醉起止时间:

                      <span class="T20">{{
                        data.setlinfo.oprn_oprt_code_cnt
                      }}</span>
                    </div>
                  </div>
                </td>
              </tr>
              <tr class="Table141">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P5">
                    呼吸机使用时间:<span class="T20">{{
                      data.setlinfo.vent_used_h_cnt
                    }}</span>
                  </p>
                </td>
              </tr>
              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P7">
                    <span class="T19">颅脑损伤患者昏迷时间：入院前</span
                    ><span class="T20">{{
                      data.setlinfo.bfadm_coma_h_cnt
                    }}</span>
                    <span class="T19">入院后</span
                    ><span class="T20">{{
                      data.setlinfo.afadm_coma_h_cnt
                    }}</span>
                  </p>
                 
                </td>
              </tr>
              <tr class="Table143">
                <td
                  colspan="3"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P4" style="    line-height: 20px;">重症监护病房类型（CCU、NICU、EICU、SICU、PICU、RICU、其他）</p>
                 
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 0.1951in"
                  class="Table1_A1"
                >
                  <p class="P4" style="    line-height: 20px;">进重症监护室时间（_年_月_日_时_分）</p>
                 
                </td>
                <td
                  colspan="6"
                  style="text-align: left; width: 0.0521in"
                  class="Table1_A1"
                >
                  <p class="P4" style="    line-height: 20px;">出重症监护室时间（_年_月_日_时_分）</p>
                  
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.3875in"
                  class="Table1_A1"
                >
                  <p class="P4" style="    line-height: 20px;">合计（小时）</p>
                </td>
              </tr>
              <tr
                class="Table144 paddingLeft"
                v-for="(item, index) in data.icuinfo"
                :key="'index3' + index"
              >
                <td
                  colspan="3"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1"
                >
                  {{ item.scs_cutd_ward_type }}
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 0.1951in"
                  class="Table1_A1"
                >
                  {{ item.scs_cutd_inpool_time }}
                </td>
                <td
                  colspan="6"
                  style="text-align: left; width: 0.0521in"
                  class="Table1_A1"
                >
                  {{ item.scs_cutd_exit_time }}
                </td>
                <td
                  colspan="3"
                  style="text-align: left; width: 0.3875in"
                  class="Table1_A1"
                >
                  {{ item.scs_cutd_sum_dura }}
                </td>
              </tr>

              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P7">
                    <span class="T19">输血品种</span
                    ><span class="T20">{{ data.setlinfo.bld_cat }}  </span
                    ><span class="T19">输血量</span
                    ><span class="T20"> {{ data.setlinfo.bld_amt }} </span
                    ><span class="T19">          输血计量单位</span
                    ><span class="T20">{{ data.setlinfo.bld_unt }}  </span>
                  </p>
                </td>
              </tr>
              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P15">
                    <span class="T18">特级护理天数</span
                    >
                   
                   <span class="T20" style="padding-right:0">{{ data.setlinfo.spga_nurscare_days}}</span>天&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="T18">一级护理天数</span
                    >
                    <span class="T20" style="padding-right:0"
                      >{{ data.setlinfo.lv1_nurscare_days}}</span
                    >天&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="T18">二级护理天数</span>
                   <span class="T20" style="padding-right:0"
                      >{{ data.setlinfo.scd_nurscare_days}}</span
                    >天&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="T18">三级护理天数</span>
                  <span class="T20" style="padding-right:0"
                      >{{ data.setlinfo.lv3_nurscare_days}}</span
                    >天&nbsp;&nbsp;&nbsp;&nbsp;
                  </p>
                </td>
              </tr> -->
              <tr class="Table118">
                <td
                  colspan="17"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P18">
                    <span class="T15">离院方式： </span>
                   
                      
               
                    <span class="T13"> 
                      <el-select
                      v-model="menform.dscg_way "
                      placeholder="离院方式"
                      style="width:200px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.dscg_waylist "
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>     </span>
                  </p>
                 
                </td>
              </tr>
       
              <tr class="Table151">
                <td
                  colspan="7"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P15">
                    <span class="T18">主诊医师姓名</span
                    ><span class="T32">*</span
                    ><span class="T20">{{ data.setlinfo.chfpdr_name }} 
                      <div class="yisheng">
                      <el-popover
                        placement="bottom-end"
                        v-model="visiblePatient"
                        trigger="focus"
                      >
                        <el-input
                          placeholder="姓名"
                          slot="reference"
                          v-model="menform.chfpdr_name"
                          size="mini"
                          style="height:40px"
                        >
                     
                        </el-input>
                        <el-table
                          @row-click="xuanzePatient"
                          height="300"
                          :data="
                            duserlist.filter(
                              data =>
                                !menform.chfpdr_name ||
                                data.real_name
                                  .toLowerCase()
                                  .includes(menform.chfpdr_name.toLowerCase())
                            )
                          "
                        >
                          <el-table-column
                            width="100"
                            property="number"
                            label="序号"
                          ></el-table-column>

                          <el-table-column
                            width="150"
                            property="real_name"
                            label="姓名"
                          ></el-table-column>
                          <el-table-column
                            width="100"
                            property="dept_name"
                            label="科室"
                          ></el-table-column>

                          <el-table-column
                            width="50"
                            property="gender"
                            label="性别"
                          >
                          <template slot-scope="scope">
       {{scope.row.gender==1?'男':scope.row.gender==2?'女':'未知'}}
      </template>
                          </el-table-column>

                      
                        </el-table>
                      </el-popover>
                    </div>
                    </span>
                  </p>
                </td>
                <td
                  colspan="10"
                  style="text-align: left; width: 0.391in"
                  class="Table1_A1"
                >
                  <p class="P15">
                    <span class="T18">主诊医师代码</span>
                    <span class="T32">*</span
                    ><span class="T20">{{ menform.chfpdr_code }} </span>
                  </p>
                </td>
              </tr>
              <tr class="Table151">
                <td
                  colspan="7"
                  style="text-align: left; width: 1.5597in"
                  class="Table1_A1 paddingLeft"
                >
                  <p class="P15">
                    <span class="T18">责任护士姓名</span
                    ><span class="T32">*</span
                    ><span class="T20">
                        <el-popover
                        placement="bottom-end"
                        v-model="visiblePatient2"
                        trigger="focus"
                      >
                        <el-input
                          placeholder="姓名"
                          slot="reference"
                          v-model="menform.nurse_name"
                          size="mini"
                          style="height:40px"
                        >
                     
                        </el-input>
                        <el-table
                          @row-click="xuanzePatient2"
                          height="300"
                          :data="
                            duserlist2.filter(
                              data =>
                                !menform.nurse_name ||
                                data.real_name
                                  .toLowerCase()
                                  .includes(menform.nurse_name.toLowerCase())
                            )
                          "
                        >
                          <el-table-column
                            width="100"
                            property="number"
                            label="序号"
                          ></el-table-column>

                          <el-table-column
                            width="150"
                            property="real_name"
                            label="姓名"
                          ></el-table-column>
                          <el-table-column
                            width="100"
                            property="dept_name"
                            label="科室"
                          ></el-table-column>

                          <el-table-column
                            width="50"
                            property="gender"
                            label="性别"
                          >
                          <template slot-scope="scope">
       {{scope.row.gender==1?'男':scope.row.gender==2?'女':'未知'}}
      </template>
                          </el-table-column>

                      
                        </el-table>
                      </el-popover>
                       </span>
                  </p>
                </td>
                <td
                  colspan="10"
                  style="text-align: left; width: 0.391in"
                  class="Table1_A1"
                >
                  <p class="P15">
                    <span class="T18">责任护士代码</span
                    ><span class="T32">*</span
                    ><span class="T20">{{ menform.nurse_code }} </span>
                  </p>
                </td>
              </tr>
            </table>
            <table border="0" cellspacing="0" cellpadding="0" class="Table2">
              <colgroup>
                <col width="242" />
                <col width="115" />
                <col width="115" />
                <col width="119" />
                <col width="111" />
                <col width="115" />
              </colgroup>
              <tr class="Table21">
                <td
                  colspan="6"
                  style="text-align: left; width: 2.184in"
                  class="Table2_A1"
                >
                  <p class="P12">四、医疗收费信息</p>
                </td>
              </tr>
              <tr class="Table21">
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P6">
                    业务流水号：<span class="T20">
                      <el-input class="input-new-tag"
                          v-model="menform.bill_code"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input> 
                    </span>
                  </p>
                  <p class="P6">
                    票据代码：<span class="T20">
                      <el-input class="input-new-tag"
                          v-model="menform.bill_code"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input> 
                    </span>
                  </p>
                  <p class="P6">
                    票据号码：<span class="T20">
                    <el-input class="input-new-tag"
                          v-model="menform.bill_no"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input> 
                    </span>
                  </p>
                </td>
                <td
                  colspan="5"
                  style="text-align: left; width: 1.0389in"
                  class="Table2_A2"
                >
                  <p class="P11">
                   结算时间
                   <el-date-picker
      v-model="value1"
      type="daterange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      @change="settime"
      format="yyyy 年 MM 月 dd 日"
      value-format="yyyy-MM-dd"
      >
    </el-date-picker>
                      <!-- <el-date-picker
                      v-model="menform.setl_begn_date"
                      type="date"
                      placeholder="选择日期"
                      format="yyyy 年 MM 月 dd 日"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                     -
                      <el-date-picker
                      v-model="menform.setl_end_date"
                      type="date"
                      placeholder="选择日期"
                      format="yyyy 年 MM 月 dd 日"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker> -->
                  
                  </p>
                </td>
              </tr>
              <tr class="Table21">
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P12">项目名称</p>
                </td>
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P4">收费项目等级</p>
                </td>
                <!-- <td style="text-align: left; width: 1.0396in" class="Table2_A2">
                  <p class="P4">收费项目类别</p>
                </td> -->
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P4">明细项目费用总额</p>
                </td>
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P4">全自费金额</p>
                </td>
                <!-- <td style="text-align: left; width: 1.0396in" class="Table2_A2">
                  <p class="P4">其他</p>
                </td> -->
                
              </tr>
           

               <tr
                class="Table24"
                v-for="(item, index) in data.iteminfo"
                :key="'index4' + index"
              >
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  <p class="P4">
                    {{ $baseBai["med_chrgitm_type"][item.med_chrgitm_type] }}
                  </p>
                </td>
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  {{ item.chrgitm_lv==1?'甲类':item.chrgitm_lv==2?'乙类':'' }}
                </td>
                <!-- <td style="text-align: left; width: 1.0396in" class="Table2_A2">
                  {{ item.med_chrgitm_type }}
                </td> -->
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  {{ item.det_item_fee_sumamt }}
                </td>
                <td style="text-align: left; width: 2.184in" class="Table2_A2">
                  {{ item.fulamt_ownpay_amt }}
                </td>
                
              </tr>
            </table>
            <!-- 医保统筹基金支付 -->
          
            <table border="0" cellspacing="0" cellpadding="0" class="Table3 tableJiJin">
              <tr class="Table31">
                <td class="Table3_A1" colspan="2" style="text-align: center;font-weight: bold;">医保统筹基金支付</td>
                <td class="Table3_A1"></td>
                <td class="Table3_A1" rowspan="12" style="text-align: center;font-weight: bold;">个人负担</td>
                <td class="Table3_A1" rowspan="3">个人自付</td>
                <td class="Table3_A1" rowspan="3">
                                 <el-input class="input-new-tag"
                          v-model="menform.psn_selfpay_amt"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>

                </td>
                
              </tr>
              <!-- <tr> <td class="Table3_A1" rowspan="3" style="text-align: center;font-weight: bold;">个人支付</td>
                 <td  class="Table3_A1"  rowspan="2">个人账户支付</td>
                <td  class="Table3_A1" rowspan="2">0.0</td></tr> -->
               <tr class="Table31" v-for="(item,index) in payinfolist" :key="index">
               
                <td   class="Table3_A1" colspan="2">{{item.fund_pay_name}}</td>
                <td  class="Table3_A1">{{item.fund_payamt}}</td>
                
               <!-- 22 51 -->
                <!-- <td v-if="index==2" class="Table3_A1" colspan="2">{{item.fund_pay_name}}</td>
                <td v-if="index==2" class="Table3_A1">{{item.fund_payamt}}</td> -->
                <td v-if="index==2" class="Table3_A1"  rowspan="3">个人自费</td>
                <td v-if="index==2" class="Table3_A1" rowspan="3">
                  <el-input
  class="input-new-tag"
  
  v-model="menform.psn_ownpay_fee"
  ref="saveTagInput"
  size="small"

>
</el-input>

                  
     
                </td>
                 <!-- <td v-if="index==5" class="Table3_A1" colspan="2">{{item.fund_pay_name}}</td>
                <td v-if="index==5" class="Table3_A1">{{item.fund_payamt}}</td> -->
                <td v-if="index==5" class="Table3_A1"  rowspan="3">个人账户支付</td>
                <td v-if="index==5" class="Table3_A1" rowspan="3">
                  
                  <el-input
  class="input-new-tag"
  
  v-model="menform.acct_payamt"
  ref="saveTagInput"
  size="small"

>
</el-input>
                </td>
               <!-- <td v-if="index==8" class="Table3_A1" colspan="2">{{item.fund_pay_name}}</td>
                <td v-if="index==8" class="Table3_A1">{{item.fund_payamt}}</td> -->
                <td v-if="index==8" class="Table3_A1"  rowspan="3">个人现金支付</td>
                <td v-if="index==8" class="Table3_A1" rowspan="3">      <el-input
  class="input-new-tag"
  
  v-model="menform.psn_cashpay"
  ref="saveTagInput"
  size="small"
  
>
</el-input></td>
             
              </tr>
         
   
            
              <tr class="Table31" />
              <tr class="Table31" />
              <tr class="Table31">
                <td
                  colspan="6"
                  style="text-align: left; width: 0.2965in"
                  class="Table3_A1"
                >
                  <p class="P18">
                    <span class="T24">医保支付方式:</span>
                     <!-- <span style=" font-weight: bold;
                        border: 1px solid #cccccc;
                        padding: 3px 5px;
                        margin: 0 30px 0 10px;"> -->

    
   <el-select
                      v-model="menform.hi_paymtd"
                      placeholder="医保支付方式"
                      style="width:120px"
                    >
                      <el-option
                        v-for="(item, index) in infodata.hi_paymtdlist"
                        :key="index"
                        :label="item.name"
                        :value="item.value"
                        >{{ item.name }}</el-option
                      >
                    </el-select>
                       <!-- </span> -->

                

                   
                  </p>
                </td>
              </tr>
              <tr class="Table312">
                <td
                  colspan="6"
                  style="text-align: left; width: 0.2965in"
                  class="Table3_A12"
                >
                  <div class=" centWrap">
                    <div style="50%">
                       <span class="T17" style="wi">  定点医疗机构填报部门</span
                    ><span class="T20">
                      <el-input class="input-new-tag"
                          v-model="menform.medins_fill_dept"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                      </span>
                   
                    </div>
                   <div>
                      <span class="T19">  医保经办机构</span
                    ><span class="T20">
                       <el-input class="input-new-tag"
                          v-model="menform.hsorg"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                      </span>
                   </div>
                    <!-- <div>
                        <span class="T19">  代码</span
                    ><span class="T20"> {{ data.setlinfo.optins_no }} </span>
                    </div> -->
                  </div>
                  <div class="P7 centWrap">
                    <div>
                       <span class="T19">医疗机构填报人</span
                    ><span class="T20">
                      <el-input class="input-new-tag"
                          v-model="menform.medins_fill_psn"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                     
                    </span>
                    </div>
                   <div>
                      <span class="T19">   医保机构经办人</span
                    ><span class="T20">
                          <el-input class="input-new-tag"
                          v-model="menform.hsorg_opter"
                            ref="saveTagInput"
                            size="small"
                          >
                            </el-input>
                       </span>
                   </div>
                    <!-- <div>
                          <span class="T19">  代码</span
                      ><span class="T20"> {{ data.setlinfo.poolarea_no }} </span>
                      </div> -->
                  </div>
                </td>
              </tr>
            </table>
            <!-- <p class="P19">
              <span class="T14">（注：</span><span class="T33">“*”</span
              ><span class="T14">代表选填数据项）</span>
            </p> -->
          </td>
        </tr>
      </table>
    </div>
  </div>
</template>

<script>
import TopManu from "@/components/TopMenu";
import { getQdInfo,uploadMedinfo } from "@/api/zhuyanre"
import infodata from "./data";
import { getIndex,} from "@/api/account";
export default {
  name: "app-container",
  data() {
    return {
      menform:{
        prfs:'',
        curr_addr:'',
        emp_name:'',
         emp_addr:'',
         emp_tel:'',
         //联系人姓名 
         coner_name:'' ,//与患者关系 
         patn_rlts:'',// （字典） 
         coner_addr:"",//联系人地址 
         //联系人电话
         coner_tel:'',//  医保类型：
         hi_type:'',//(数据字典)  
         //住院医疗类型
         ipt_med_type:'',
         dscg_time:'',//离院时间  
         //离院方式 
         dscg_way:'',// (数据字典) 
         // 票据代码：
         bill_code:'',
         //票据号码：
         bill_no:'', 
        //结算开始日期 
        setl_begn_date:'',  
        //结算结束日期：
        setl_end_date:'', 
        //个人自付
        psn_selfpay_amt:'',
        // 个人自费  
        psn_ownpay_fee:'',
        //个人账户支出
        acct_payamt:'',
        //个人现金支出 
        psn_cashpay:'', 
        //医保支付方式 
        hi_paymtd:'', 
        //  医保机构：
        hsorg:'',//  
        //医保机构经办人：
        hsorg_opter:'',
        // 医疗机构填报部：
        medins_fill_dept:'',
        //医疗机构填报人 
        medins_fill_psn:'',
        // 主诊医师姓名：
        chfpdr_name:'',
          //主诊医生代码：
          chfpdr_code:'',
          sp_psn_type:'',
          nurse_name:'',
          nurse_code:'',
          medcasno:'',
          fund_info:[],  //医保基金支付
        iteminfo:[] //收费项目
 
      },
      data: {
        diseinfo: {},
        icuinfo: {},
        iteminfo:JSON.parse(JSON.stringify(infodata.iteminfo)),
        oprninfo: {},
        opspdiseinfo: {},
        payinfo: {},
        setlinfo: {},
        id: "",
       
      },

       payinfolist:infodata.payinfolist,
       inputVisible: false,
        inputValue: '',
     infodata:infodata,
     visiblePatient:false,
     visiblePatient2:false,
     duserlist:[],    
     duserlist2:[],  
    fixmedins_code: "",
    fixmedins_name: "",
    value1:'',
    };
  },
  beforeMount() {
    
    console.log(infodata)
},
  mounted() {
    
    this.id = this.$route.query.id;
    this.getList();
    this.getIndex()
    this.getIndex2()
  },
  methods: {
    getList() {
      let t = this;

      getQdInfo({ id: t.id }).then((res) => {
        console.log("res", res.data);
        if (res.code == 200) {
          t.fixmedins_code=res.data.fixmedins_code
          t.fixmedins_name=res.data.fixmedins_name
          t.data.setlinfo = res.data.yb_response.setlinfo;
          t.data.payinfo=res.data.yb_response.setldetail
          for (let i = 0; i <  t.data.iteminfo.length; i++) {
            for (let j = 0; j < res.data.fee_detail.length; j++) {
              if (t.data.iteminfo[i].med_chrgitm_type==res.data.fee_detail[j].med_chrgitm_type) {
                t.data.iteminfo[i]=res.data.fee_detail[j]
              }
            }
          }
            for (let i = 0; i <  t.payinfolist.length; i++) {
            for (let j = 0; j < t.data.payinfo.length; j++) {
              if (t.payinfolist[i].fund_pay_type==t.data.payinfo[j].fund_pay_type) {
                t.payinfolist[i]=t.data.payinfo[j]
              }
            }
          }
        }
          //  res.data.payinfo.forEach(function(item,i){
           
          //   var  arr=item.fund_pay_name
          //   t.payinfolist[i+1]=arr
          // })
          // console.log(t.payinfolist)
      });
    },
 
    xuanzePatient(item) {
      console.log("item", item);
    this.menform.chfpdr_name=item.real_name
    this.menform.chfpdr_code=item.medical_insurance_number
    this.visiblePatient = false;
    },
       xuanzePatient2(item) {
      console.log("item", item);
    this.menform.nurse_name=item.real_name
    this.menform.nurse_code=item.medical_insurance_number
    this.visiblePatient2 = false;
    },
          getIndex(){
       var data_y={
         user_type:2,
         page:1,
         limit:3000,
        //  status:1
       }
 
      getIndex(data_y)
      .then(res=>{
         this.duserlist = res.data.list
       
      })
      .catch(e=>{
    
        this.$message({
          message:e.message,
          type: 'error'
        });
      })
    },
      getIndex2(){
       var data_y={
         user_type:3,
         page:1,
         limit:3000,
        //  status:1
       }
 
      getIndex(data_y)
      .then(res=>{
      
         this.duserlist2 = res.data.list
      })
      .catch(e=>{
    
        this.$message({
          message:e.message,
          type: 'error'
        });
      })
    },
    settime(){
      this.menform.setl_begn_date=this.value1[0]
      this.menform.setl_end_date=this.value1[1]
    
    },
    updata(){
          var data_t=this.menform
          data_t.medcasno=this.data.setlinfo.medcasno
          data_t.iteminfo=[]
          this.data.iteminfo.forEach(res => {
            var arr={
                amt:res.det_item_fee_sumamt, 
                claa_sumfee:'0.00', 
                fulamt_ownpay_amt:res.fulamt_ownpay_amt,
                clab_amt:'0.00',
                oth_amt:'0.00',
                med_chrgitm:res.med_chrgitm_type
            }
             data_t.iteminfo.push(arr)
          });
           this.payinfolist.forEach(res=>{
             delete res.fund_pay_name
           })
           data_t.id = this.$route.query.id;
          data_t.fund_info=this.payinfolist
          console.log(data_t)
          uploadMedinfo(data_t).then(res=>{
                console.log(res)
                if(res.code==200){
                  this.$message({
                    message:'上传成功',
                    type: 'success'
                  });
                 
                }
          })
    },
    printBtn(e) {
      // if (!!window.ActiveXObject || "ActiveXObject" in window) { //是否ie
      //     alert('9090');
      //     remove_ie_header_and_footer();
      // }
      this.remove_ie_header_and_footer();
      let subOutputRankPrint = document.getElementById("printcons");
      console.log(subOutputRankPrint.innerHTML);
      let newContent = subOutputRankPrint.innerHTML;
      let oldContent = document.body.innerHTML;
      document.body.innerHTML = newContent;
      window.print();
      window.location.reload();
      document.body.innerHTML = oldContent;
      return false;
    },

    //去掉页眉和页脚
    remove_ie_header_and_footer() {
      var hkey_path;
      hkey_path =
        "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
      try {
        var RegWsh = new ActiveXObject("WScript.Shell");
        RegWsh.RegWrite(hkey_path + "header", "");
        RegWsh.RegWrite(hkey_path + "footer", "");
      } catch (e) {}
    },
  },
  components: {
    TopManu,
  },
};
</script>
<style media="print">
@page {
  size: auto; /* auto is the initial value */
  margin: 0mm; /* this affects the margin in the printer settings */
}
@media print {
}
body {
  -webkit-print-color-adjust: exact;
}
</style>

<style lang="scss" scoped  >
@import "./index.scss";
</style>
